package com.ruyiadmin.springboot.common_infrastructure.classes;

import com.ruyiadmin.springboot.common_infrastructure.models.base_entity_model.RuYiAdminBaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 系统用户DTO模型
 *
 * @author RuYiAdmin
 * @since 2022-07-17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "SysUserDTO对象", description = "用户")
public class SysUserDTO extends RuYiAdminBaseDTO {
    @ApiModelProperty("登录账号")
    private String logonName;

    @ApiModelProperty("用户名")
    private String displayName;

    @ApiModelProperty("用户密码")
    private String password;

    @ApiModelProperty("座机号")
    private String telephone;

    @ApiModelProperty("手机号")
    private String mobilephone;

    @ApiModelProperty("电子邮件")
    private String email;

    @ApiModelProperty("是否超级用户，0：否，1：是")
    private int isSupperAdmin;

    @ApiModelProperty("序号")
    private int serialNumber;

    @ApiModelProperty("是否启用")
    private int isEnabled;

    @ApiModelProperty("性别，男：0，女：1，第三性别：2")
    @NotNull
    private Integer sex;

    @ApiModelProperty("盐")
    private String salt;

    @ApiModelProperty("预留字段1")
    @Length(max = 36)
    private String extend1;

    @ApiModelProperty("预留字段2")
    @Length(max = 64)
    private String extend2;

    @ApiModelProperty("预留字段3")
    @Length(max = 128)
    private String extend3;

    @ApiModelProperty("预留字段4")
    @Length(max = 256)
    private String extend4;

    @ApiModelProperty("预留字段5")
    @Length(max = 512)
    private String extend5;

    @ApiModelProperty("机构编号")
    private String orgId;

    @ApiModelProperty("机构名称")
    private String orgName;

    @ApiModelProperty("token")
    private String token;

    @ApiModelProperty("token有效时间，单位：秒")
    private int tokenExpiration;
}
